<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<meta name="renderer" content="webkit">
  		<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<title>{{ app_name }}</title>
        <link rel="icon" href="/static/logo.ico" type="image/x-icon" />
		<link rel="stylesheet" type="text/css" href="/static/admin/layui/css/layui.css"/>
		<link rel="stylesheet" type="text/css" href="/static/admin/css/admin.css"/>
	</head>
	<body>
		<div class="main-layout" id='main-layout'>
			<!--侧边栏-->
			<div class="main-layout-side">
{#				 <div class="m-logo"></div>#}
			    <div class="logo" style="height: 60px; display: flex; align-items: center; justify-content: center; background-color: #444c63;">
                    <img src="/static/logo/LOGO_3.png" alt="TARA分析平台" style="max-height: 70px; max-width: 100%;">
                    <h4 style="color: white; font-style: italic;  font-family: '黑体', 'HeiTi', sans-serif; font-size: 20px;">TARA平台</h4>
                </div>

				<ul class="layui-nav layui-nav-tree" lay-filter="leftNav">
				  <li class="layui-nav-item layui-nav-itemed">
				    <a href="javascript:"><i class="iconfont">&#xe607;</i>系统建模</a>
				    <dl class="layui-nav-child">
                        <dd><a href="javascript:" data-url="{{ url_for('task_management') }}" data-id='1' data-text="车型项目管理"><span class="l-line"></span>车型项目管理</a></dd>
                        <dd><a href="javascript:" data-url="{{ url_for('getFuncRelation') }}" data-id='2' data-text="功能相关性"><span class="l-line"></span>车型功能相关性</a></dd>
                        <dd><a href="javascript:" data-url="{{ url_for('func_domain')}}" data-id='4' data-text="ITEM定义"><span class="l-line"></span>ITEM 定义</a></dd>
				        <dd><a href="javascript:" data-url="{{ url_for('get_ecu_define') }}" data-id='3' data-text="零部件相关性"><span class="l-line"></span>零部件相关性</a></dd>

                    </dl>
				  </li>
				  <li class="layui-nav-item">
				    <a href="javascript:"><i class="iconfont">&#xe609;</i>威胁分析&风险评估</a>
				    <dl class="layui-nav-child">
                        <dd><a href="javascript:" data-url="{{ url_for('damage_scenario') }}" data-id='6' data-text="损害场景识别"><span class="l-line"></span>损害场景评估</a></dd>
				        <dd><a href="javascript:" data-url="{{ url_for('threat_scenario') }}" data-id='7' data-text="威胁场景识别"><span class="l-line"></span>威胁场景评估</a></dd>
{#				        <dd><a href="javascript:" data-url="{{ url_for('risk_level_form') }}" data-id='5' data-text="风险等级定义"><span class="l-line"></span>风险等级定义</a></dd>#}
                        <dd><a href="javascript:" data-url="{{ url_for('riskDecision') }}" data-id='9' data-text="风险决策"><span class="l-line"></span>风险决策</a></dd>
				        <dd><a href="javascript:" data-url="{{ url_for('risk_disposal') }}" data-id='10' data-text="风险处置"><span class="l-line"></span>风险处置</a></dd>
{#				        <dd><a href="javascript:" data-url="{{ url_for('risk_disposal2') }}" data-id='8' data-text="风险处置2"><span class="l-line"></span>风险处置2</a></dd>#}
				    </dl>
				  </li>
                    <li class="layui-nav-item">
				    <a href="javascript:"><i class="iconfont">&#xe602;</i>安全报告</a>

				    <dl class="layui-nav-child">
                        <dd><a href="javascript:" data-url="{{ url_for('show_tara_report') }}" data-id='11' data-text="TARA报告"><span class="l-line"></span>TARA报告</a></dd>
                        <dd><a href="javascript:" data-url="{{ url_for('security_reqs_alloc')}}" data-id='12' data-text="安全需求分配"><span class="l-line"></span>安全需求分配</a></dd>
                        <dd><a href="javascript:" data-url="{{ url_for('reportManage') }}" data-id='13' data-text="报告管理"><span class="l-line"></span>报告管理</a></dd>
				    </dl>

				  </li>
					<li class="layui-nav-item">
				    <a href="javascript:"><i class="iconfont">&#xe60c;</i>基础数据</a>
				    <dl class="layui-nav-child">
                        <dd><a href="javascript:" data-url="{{ url_for('features_form') }}" data-id='15' data-text="特性列表"><span class="l-line"></span>特性列表</a></dd>
                        <dd><a href="javascript:" data-url="{{ url_for('safety_req_form') }}" data-id='16' data-text="安全需求"><span class="l-line"></span>安全需求</a></dd>
                    {% if role == '1' %}
                        <dd><a href="javascript:" data-url="{{ url_for('experience_repository_form') }}" data-id='18' data-text="基础数据"><span class="l-line"></span>经验库</a></dd>
				    {% endif %}
				    </dl>
				  </li>
					<li class="layui-nav-item">
				    <a href="javascript:"><i class="iconfont">&#xe60b;</i>系统设置</a>
				    <dl class="layui-nav-child">
				        <dd><a href="javascript:" data-url="{{ url_for('user_manage') }}" data-id='30' data-text="用户管理"><span class="l-line"></span>用户管理</a></dd>
				        <dd><a href="javascript:" data-url="{{ url_for('customerManage') }}" data-id='31' data-text="企业管理"><span class="l-line"></span>企业管理</a></dd>
                    {% if role == '1' %}
				        <dd><a href="javascript:" data-url="{{ url_for('dbManage') }}" data-id='32' data-text="数据导入"><span class="l-line"></span>数据导入</a></dd>
				        <dd><a href="javascript:" data-url="{{ url_for('dbView') }}" data-id='33' data-text="数据查看"><span class="l-line"></span>数据查看</a></dd>
                    {% endif %}
{#				        <dd><a href="javascript:" data-url="{{ url_for('logManage') }}" data-id='34' data-text="模版管理" ><span class="l-line"></span>模版管理</a></dd>#}
                        <dd><a href="javascript:" data-url="{{ url_for('logManage') }}" data-id='35' data-text="日志管理"><span class="l-line"></span>日志管理</a></dd>

				    </dl>
				  </li>
				</ul>
			</div>
			<!--右侧内容-->
			<div class="main-layout-container">
				<!--头部-->
				<div class="main-layout-header">
					<div class="menu-btn" id="hideBtn">
						<a href="javascript:void(0);">
							<span class="iconfont">&#xe60e;</span>
						</a>
					</div>
					<ul class="layui-nav" lay-filter="rightNav">
					  <li class="layui-nav-item"><a href="javascript:" data-url="{{ url_for('task_management') }}" data-id='30' data-text="当前项目">
                          当前项目：<span id="currentProjectName">{{ projectName }}</span>
                            <span class="layui-badge-dot layui-bg-blue"></span>
                      </a></li>
{#					  <li class="layui-nav-item"><a href="javascript:;" data-url="email.html" data-id='21' data-text="邮件系统"><i class="iconfont">&#xe603;</i></a></li>#}
					  <li class="layui-nav-item">
					    <a href="javascript:" data-url="{{ url_for('static', filename='user-info.html') }}" data-id='31' data-text="个人信息">欢迎您：{{ user_name }}</a>
					  </li>
					  <li class="layui-nav-item"><a href="javascript:logout();">退出</a></li>
					</ul>
				</div>
				<!--主体内容-->
				<div class="main-layout-body">
					<!--tab 切换-->
					<div class="layui-tab layui-tab-brief main-layout-tab" lay-filter="tab" lay-allowClose="true">
					  <ul class="layui-tab-title">
					    <li class="layui-this welcome">主页</li>
					  </ul>
					  <div class="layui-tab-content">
					    <div class="layui-tab-item layui-show" style="background: #f5f5f5;">
					    	<!--1-->
					    	<iframe src="{{ url_for('welcome') }}" width="100%" height="100%" name="iframe"  class="iframe" framborder="0"></iframe>
					    	<!--1end-->
					    </div>
					  </div>
					</div>
				</div>
			</div>
			<!--遮罩-->
			<div class="main-mask">

			</div>
		</div>
		<script src="/static/admin/layui/layui.js" type="text/javascript" charset="utf-8"></script>
		<script src="/static/admin/js/common.js" type="text/javascript" charset="utf-8"></script>
		<script src="/static/admin/js/main.js" type="text/javascript" charset="utf-8"></script>
		<script type="text/javascript">
			var scope={
				link:'./welcome.html'
			};
			var layer = layui.layer;
			function logout(){
			    var $ = layui.jquery;
			    layer.confirm("您确定退出吗？",{
			        title:'操作信息',
                    icon:3},
                    function (){
                        $.ajax({
                            url:'/logout',
                           type:'post',
                           dataType:'json',
                           success:function (res){
                               location.href="/login";
                           },
                           error:function (a,b,c){
                               layer.alert("系统异常，请联系管理员！");
                           }
                        });
                    },
                    function(){
			            // layer.alert("取消执行");
                    }
                );
            }
            // 更新当前项目名称的函数
            function updateCurrentProjectName(projectName) {
                var currentProjectNameElement = document.getElementById('currentProjectName');
                if (currentProjectNameElement) {
                    currentProjectNameElement.innerText = projectName;
                } else {
                    console.error('Element with id "currentProjectName" not found');
                }
            }
		</script>
	</body>
	<footer>
		<p class="copyright">&copy; Copyright 2022-2024 HUAWEI</p>
	</footer>
</html>